An object-oriented programming language, e.g. the Java™ programming language, can dynamically encapsulate program behavior with methods in classes. However, the objects in the object-oriented programming language tend to be relatively heavyweight, due to the instantiation of separately-declared classes wrapping a handful of fields and different methods. Given the increasing relevance of callbacks and other functional-style idioms, it is beneficial that modeling code as data in the object-oriented programming language can be as lightweight as possible.
This is the general area that embodiments of the invention are intended to address.